package com.bao.bean;
/*
    定义猫类Cat。属性:毛的颜色color，品种breed。行为:吃饭eat()，抓老鼠catchMouse()
 */
public class Cat {
    private String color;
    private String breed;

    public Cat(String color, String breed) {
        this.color = color;
        this.breed = breed;
    }

    public Cat() {
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    public void eat(){
        System.out.print("一只"+color+"的"+breed+"猫，");
        System.out.println("吃鱼中");
    }

    public void catchMouse(){
        System.out.print("一只"+color+"的"+breed+"猫，");
        System.out.println("抓老鼠中");
    }
}
